Optimal. Leaf size=22 \[ \frac{\tanh ^{-1}(\sin (x))}{2 a^2}+\frac{\tan (x) \sec (x)}{2 a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0316159, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3175, 3768, 3770} \[ \frac{\tanh ^{-1}(\sin (x))}{2 a^2}+\frac{\tan (x) \sec (x)}{2 a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3175
Rule 3768
Rule 3770
Rubi steps
\begin{align*} \int \frac{\cos (x)}{\left (a-a \sin ^2(x)\right )^2} \, dx &=\frac{\int \sec ^3(x) \, dx}{a^2}\\ &=\frac{\sec (x) \tan (x)}{2 a^2}+\frac{\int \sec (x) \, dx}{2 a^2}\\ &=\frac{\tanh ^{-1}(\sin (x))}{2 a^2}+\frac{\sec (x) \tan (x)}{2 a^2}\\ \end{align*}
Mathematica [B] time = 0.0056328, size = 45, normalized size = 2.05 \[ \frac{\tan (x) \sec (x)-\log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )+\log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )}{2 a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.036, size = 44, normalized size = 2. \begin{align*} -{\frac{1}{4\,{a}^{2} \left ( -1+\sin \left ( x \right ) \right ) }}-{\frac{\ln \left ( -1+\sin \left ( x \right ) \right ) }{4\,{a}^{2}}}-{\frac{1}{4\,{a}^{2} \left ( 1+\sin \left ( x \right ) \right ) }}+{\frac{\ln \left ( 1+\sin \left ( x \right ) \right ) }{4\,{a}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.00151, size = 55, normalized size = 2.5 \begin{align*} -\frac{\sin \left (x\right )}{2 \,{\left (a^{2} \sin \left (x\right )^{2} - a^{2}\right )}} + \frac{\log \left (\sin \left (x\right ) + 1\right )}{4 \, a^{2}} - \frac{\log \left (\sin \left (x\right ) - 1\right )}{4 \, a^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.79149, size = 116, normalized size = 5.27 \begin{align*} \frac{\cos \left (x\right )^{2} \log \left (\sin \left (x\right ) + 1\right ) - \cos \left (x\right )^{2} \log \left (-\sin \left (x\right ) + 1\right ) + 2 \, \sin \left (x\right )}{4 \, a^{2} \cos \left (x\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.25807, size = 117, normalized size = 5.32 \begin{align*} - \frac{\log{\left (\sin{\left (x \right )} - 1 \right )} \sin ^{2}{\left (x \right )}}{4 a^{2} \sin ^{2}{\left (x \right )} - 4 a^{2}} + \frac{\log{\left (\sin{\left (x \right )} - 1 \right )}}{4 a^{2} \sin ^{2}{\left (x \right )} - 4 a^{2}} + \frac{\log{\left (\sin{\left (x \right )} + 1 \right )} \sin ^{2}{\left (x \right )}}{4 a^{2} \sin ^{2}{\left (x \right )} - 4 a^{2}} - \frac{\log{\left (\sin{\left (x \right )} + 1 \right )}}{4 a^{2} \sin ^{2}{\left (x \right )} - 4 a^{2}} - \frac{2 \sin{\left (x \right )}}{4 a^{2} \sin ^{2}{\left (x \right )} - 4 a^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.10988, size = 51, normalized size = 2.32 \begin{align*} \frac{\log \left (\sin \left (x\right ) + 1\right )}{4 \, a^{2}} - \frac{\log \left (-\sin \left (x\right ) + 1\right )}{4 \, a^{2}} - \frac{\sin \left (x\right )}{2 \,{\left (\sin \left (x\right )^{2} - 1\right )} a^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]